<script>
import {defineComponent} from 'vue'

export default defineComponent({
    name: "lifeView",
    data() {
        return {
            msg: '生命周期',
        }
    },
    methods: {},
    beforeCreate() {
        console.log(this);
        console.log(this.msg);
    },
    created() {
        console.log(this.msg + '初始化之后,可以操作data和methods中的数据了');
    },
    beforeMount() {
        console.log('虚拟dom挂载')
    },
    mounted() {
        console.log('真实的dom挂载')
    },
    beforeUpdate() {
        console.log('更新之前')
    },
    updated() {
        console.log('更新之后')
    },
    beforeDestroy() {
        console.log('销毁之前');
    },
    destroyed() {
        console.log('销毁之后');
    }
})
</script>

<template>
    <div>
        <input type="text" name="" id="" v-model="msg">
        <router-link to="/about">点我送地狱火</router-link>
    </div>
</template>

<style scoped lang="less">

</style>